﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;

namespace FrostGraphics.Umbraco.ContactForm {
  public class DropdownCollection : ConfigurationElementCollection {

    public override ConfigurationElementCollectionType CollectionType {
      get {
        return ConfigurationElementCollectionType.BasicMap;
      }
    }

    public DropdownElement this[int index] {
      get {
        return (DropdownElement)BaseGet(index);
      }
    }

    public new DropdownElement this[String name] {
      get {
        return (DropdownElement)BaseGet(name);
      }
    }

    protected override ConfigurationElement CreateNewElement() {
      return new DropdownElement();
    }

    protected override object GetElementKey(ConfigurationElement element) {
      return ((DropdownElement)element).Name;
    }

    protected override string ElementName {
      get {
        return "dropdownOption";
      }
    }

  }
}